﻿@using Mongo.Core.Models
@model List<Mongo.Core.Models.User>

<h2>Users</h2>

@Html.ActionLink("Create User", "Create")

<table>
    <tr>
        <th>Name</th>
        <th>Join Date</th>
        <th>Focus Factor</th>
        <th>&nbsp;</th>
    </tr>
    @foreach (User user in @Model)
    {
        <tr>
            <td><a href="@Url.Action("Edit", new {id = @user.Id})">@user.name</a></td>
            <td>@user.join_date</td>
            <td>@user.focus</td>
            <td>@Html.ActionLink("Delete", "Delete", new {id = @user.Id})</td>
        </tr>
    }    
</table>